package com.woniuxy.service.impl;

import com.woniuxy.dao.DeptMapper;
import com.woniuxy.domain.Dept;
import com.woniuxy.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author gaopeng
 * @create 2020/03/2020/3/25 11:36:51
 */
@Service
@Transactional
public class DeptServiceImpl implements IDeptService {

    @Autowired
    private DeptMapper mapper;

    @Override
    public void save(Dept dept) {
        mapper.save(dept);
    }

    @Override
    public void delete(Integer did) {
        mapper.delete(did);
    }

    @Override
    public void update(Dept dept) {
        mapper.update(dept);
    }

    @Override
    public List<Dept> findAll() {
        return mapper.findAll();
    }

    @Override
    public Dept findOne(Integer did) {
        return mapper.findOne(did);
    }
}
